home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
world
/
blur
/
blur.java
< prev
next >
Wrap
Text File
|
1996-10-17
|
1KB
|
81 lines
// "Simple Blur Effect" with one blur object
// created by ask@krc.sony.co.jp (Masamichi zzzcat Asukai)
//
// Copyright(C) 1996 Sony Corporation. All rights reserved.
//
import vrml.*;
import vrml.node.*;
import vrml.field.*;
public class blur extends Script {
private SFVec3f setTranslation;
private float[] translation = new float[3];
private Node realobj;
// constructor
public void initialize() {
setTranslation = (SFVec3f)getEventOut("setTranslation");
realobj = (Node)((SFNode)getField("realobj")).getValue();
// get translation of real object
((SFVec3f)realobj.getExposedField("translation")).getValue(translation);
}
public void processEvent(Event e) {
if (e.getName().equals("interval")) {
// set translation of blur object
setTranslation.setValue(translation);
// get translation of real object
((SFVec3f)realobj.getExposedField("translation")).getValue(translation);
}
}
}